@echo off
cls

set THIS_BAT_FILE=%0
set PATH_UTILITIES=%SOURCE_DIRECTORY%..\..\utilities
set PATH_SCRIPT=%PATH_UTILITIES%\mvs
set LOGGER=%PATH_UTILITIES%\cmdlog.exe

if not exist %LOGGER% set STDOUT_REDIRECTED=yes

if not "%STDOUT_REDIRECTED%" == "yes" (
    set STDOUT_REDIRECTED=yes
    cmd.exe /c %THIS_BAT_FILE% %* 2>&1 | %LOGGER% 1build.log
    exit/b
) 

echo -------------------------------------------------^> BEGIN WORK

for %%a in (.) do set NAME_PRODUCT=%%~na

call %PATH_SCRIPT%\clear.bat
if exist %SOURCE_DIRECTORY%..\..\external\%NAME_PRODUCT%   (rmdir /s /q %SOURCE_DIRECTORY%..\..\external\%NAME_PRODUCT% ) 

call builder.bat "Debug"          "32"  "build"
call builder.bat "Debug"          "64"  "build"
call builder.bat "RelWithDebInfo" "32"  "build"
call builder.bat "RelWithDebInfo" "64"  "build"

echo -------------------------------------------------^> END WORK
exit /b


